const TOKEN_ERROR = 'itcast_geek_pc'

const setToken = (token) => {
  return localStorage.setItem(TOKEN_ERROR, token)
}
const getToken = () => {
  return localStorage.getItem(TOKEN_ERROR)
}
const removeToken = () => {
  return localStorage.removeItem(TOKEN_ERROR)
}
// 判断是否有token
const isToken = () => !!getToken()
export { setToken, getToken, removeToken, isToken }
